from django.db import models

# Create your models here.
class Books(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=100, null=False)
    author = models.CharField(max_length=100, null=False)
    price = models.FloatField(default=0, null=False)

    def __str__(self):
        return "({id},{name},{author},{price})".format(id=self.id, name=self.name, author=self.author, price=self.price)
